package hibernate;
// Generated Aug 6, 2012 8:52:27 AM by Hibernate Tools 3.2.1.GA

import java.io.File;
import java.util.Date;

/**
 * This class is for scheduled activities. This data will be stored in
 * SCHEDULED_ACTIVITIES table.
 * This is comparable so when you use the dbC.isUniqueObject function it 
 * will return true (being unique) as long as the scheduled dates do not overlap 
 * with anything else on the current schedule.
 * If the sched_id's on this and the ScheduledActivity being checked against
 * do not match, they are obviously not unique.
 */
public class ScheduledActivity implements java.io.Serializable, Comparable {

    private int activityId;
    private String name;
    private int sched_id;
    private Date schedStartDate;   //All this inforation is related to the individual activity
    private Date schedStopDate;
    private Date actualStart;
    private Date actualStop;
    private Boolean completed;
    private Boolean paused;
    //private String scheduledBy;
    private String scheduledBy;
    private Date schedOn;
    private String updatedBy;
    private Date updatedOn;
    private String imageName;
    private String phonetic;
    private File image;
    private File sound;
    

    public ScheduledActivity() {
    }

    public ScheduledActivity(int activityId) {
        this.activityId = activityId;
    }

    public ScheduledActivity(int activityId, String imageName, String phonetic) {
        this.activityId = activityId;
        this.imageName = imageName;
        this.phonetic = phonetic;
    }

    public int getActivityId() {
        return this.activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public String getImageName() {
        return this.imageName;
    }

    public int getSchedId() {
        return sched_id;
    }
    
    public int getSched_id() {
        return sched_id;
    }

    public void setSched_id(int sched_id) {
        this.sched_id = sched_id;
    }

    public File getImage() {
        return image;
    }

    public void setImage(File image) {
        this.image = image;
    }

    public void setSchedId(int sched_id) {
        this.sched_id = sched_id;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    public String getPhonetic() {
        return this.phonetic;
    }

    public void setPhonetic(String phonetic) {
        this.phonetic = phonetic;
    }

    public Date getSchedStartDate() {
        return schedStartDate;
    }

    public void setSchedStartDate(Date schedStartDate) {
        this.schedStartDate = schedStartDate;
    }

    public Date getSchedStopDate() {
        return schedStopDate;
    }

    public void setSchedStopDate(Date schedStopDate) {
        this.schedStopDate = schedStopDate;
    }

    public Date getActualStart() {
        return actualStart;
    }

    public void setActualStart(Date actualStart) {
        this.actualStart = actualStart;
    }

    public Date getActualStop() {
        return actualStop;
    }

    public void setActualStop(Date actualStop) {
        this.actualStop = actualStop;
    }

    public Boolean getCompleted() {
        return completed;
    }

    public void setCompleted(Boolean completed) {
        this.completed = completed;
    }

    public Boolean getPaused() {
        return paused;
    }

    public void setPaused(Boolean paused) {
        this.paused = paused;
    }

   public String getScheduledBy() {
        return scheduledBy;
    }

    public void setScheduledBy(String scheduledBy) {
        this.scheduledBy = scheduledBy;
    }
   
    
    public Date getSchedOn() {
        return schedOn;
    }

    public void setSchedOn(Date schedOn) {
        this.schedOn = schedOn;
    }

    public Date getUpdatedOn() {
        return updatedOn;
    }

    public void setUpdatedOn(Date updatedOn) {
        this.updatedOn = updatedOn;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    @Override
    public int compareTo(Object o) {
        ScheduledActivity s = (ScheduledActivity) o;
        if (this.sched_id != s.sched_id) {
            return -1;
        }
        if ((s.schedStartDate.before(this.schedStopDate))
                && ((s.schedStartDate.equals(this.schedStartDate)
                || (s.schedStartDate.after(this.schedStartDate))))) {
            return 0;
        }
        return -1;
    }
    
    public void setSound(File sound){
        this.sound = sound;
    }
    
    public File getSound(){
        return sound;
    }
}

